/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package model.integration;

import java.io.Serializable;
import java.math.BigInteger;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.xml.bind.annotation.XmlRootElement;
import model.dto.CompetenceProfileDTO;

/**
 *
 * @author Ahmed Salem
 */
@Entity
@Table(name = "competence_profile", catalog = "greenland", schema = "")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "CompetenceProfile.findAll", query = "SELECT c FROM CompetenceProfile c"),
    @NamedQuery(name = "CompetenceProfile.findByCompetenceProfileId", query = "SELECT c FROM CompetenceProfile c WHERE c.competenceProfileId = :competenceProfileId"),
    @NamedQuery(name = "CompetenceProfile.findByPersonId", query = "SELECT c FROM CompetenceProfile c WHERE c.personId = :personId"),
    @NamedQuery(name = "CompetenceProfile.findByCompetenceId", query = "SELECT c FROM CompetenceProfile c WHERE c.competenceId = :competenceId"),
    @NamedQuery(name = "CompetenceProfile.findByYearsOfExperience", query = "SELECT c FROM CompetenceProfile c WHERE c.yearsOfExperience = :yearsOfExperience")})
public class CompetenceProfile implements Serializable,CompetenceProfileDTO {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "competence_profile_id")
    private Integer competenceProfileId;
    @Column(name="person_id")
    private Integer personId;
    @Column(name = "competence_id")
    private Integer competenceId;
    @Column(name = "years_of_experience")
    private Double yearsOfExperience;
    

    /**
     *
     */
    public CompetenceProfile() {
    }

    /**
     *
     * @param competenceProfileId
     * @param personId
     * @param competenceId
     * @param yearsOfExperience
     */
    public CompetenceProfile(Integer competenceProfileId, Integer personId, Integer competenceId, Double yearsOfExperience) {
        this.competenceProfileId = competenceProfileId;
        this.personId = personId;
        this.competenceId = competenceId;
        this.competenceId = competenceId;
        this.yearsOfExperience = yearsOfExperience;
        
    }

    /******** All the set methods for the competenceProfile class ****
     * @param competenceProfileId 
     */ 
    public void setCompetenceProfileId(Integer competenceProfileId) {
        this.competenceProfileId = competenceProfileId;
    }

    /**
     *
     * @param personId
     */
    public void setPersonId(Integer personId) {
        this.personId = personId;
    }

    /**
     *
     * @param competenceId
     */
    public void setCompetenceId(Integer competenceId) {
        this.competenceId = competenceId;
    }

    /**
     *
     * @param yearsOfExperience
     */
    public void setYearsOfExperience(Double yearsOfExperience) {
        this.yearsOfExperience = yearsOfExperience;
    }  //****** End of set methods */

//************All the get methods for the competenceProfile class***********************//
    /**
     *
     * @return
     */
    @Override
   public Integer getPersonId() {
        return personId;
    }
    
    /**
     *
     * @return
     */
    @Override
    public Integer getCompetenceProfileId() {
        return competenceProfileId;
    }
    /**
     *
     * @return
     */
    @Override
    public Integer getCompetenceId() {
        return competenceId;
    }

    /**
     *
     * @return
     */
    @Override
    public Double getYearsOfExperience() {
        return yearsOfExperience;
    }/************ The end of the get methods **/ 
    
}
